<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<c:if test="${code==1}">
	<form id="pagerForm" method="post" action="courierMapAction.action?toResult=searchCourierMap&rightId=${rightId}">
		<input type="hidden" name="pageNum" value="${page.currentPage }" /> 
		<input type="hidden" name="pageSize" value="${page.pageSize }" />
		<input type="hidden" name="realName" value="${realName}" />
	</form>

	<form onsubmit="return navTabSearch(this);" action="courierMapAction.action?toResult=searchCourierMap&rightId=${rightId}" method="post">
		<div class="pageHeader">
			<input type="hidden" name="init" value=0>
			<div class="searchBar">
				<table class="searchContent">
					<tr>
						<td>快递员名称: <input type="text" name="realName" value="${realName}"/>
						</td>
						<td>是否可用:
						</td>
						<td>
							<select name="locked">
								<option value="0" <s:if test="#request.locked==0">selected=selected</s:if>>可用</option>
								<option value="1" <s:if test="#request.locked==1">selected=selected</s:if>>不可用</option>
							</select>
						</td>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td>
							<div class="buttonActive">
								<div class="buttonContent">
									<button type="submit">检索</button>
								</div>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="pageContent">
			<div class="panelBar">
				<ul class="toolBar">
					<c:forEach items="${righSubtList}" var="rightsub">
						<!-- 添加  -->
						<c:if test="${fn:contains(rightsub.rightValue,'addCourierMap')}">
							<li><a class="add" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>
						<!-- 修改  -->
						<c:if test="${fn:contains(rightsub.rightValue,'updateCourierMap')}">
							<li><a class="edit" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>
						<!-- 浏览 -->
						<c:if test="${fn:contains(rightsub.rightValue,'findCourierMap')}">
							<li><a class="delete" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>
						<!-- 切换工作区域  -->
						<c:if test="${fn:contains(rightsub.rightValue,'changeCourierMap')}">
							<li><a class="edit" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>
						<!-- 切换工作区域  -->
						<c:if test="${fn:contains(rightsub.rightValue,'courierMoveLine')}">
							<li><a class="edit" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>	
						<!-- 绑定发货点  -->
						<c:if test="${fn:contains(rightsub.rightValue,'bindOrigin')}">
							<li><a class="edit" href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a>
							</li>
							<li class="line">line</li>
						</c:if>
					</c:forEach>
				</ul>
			</div>
			<table class="list" width="100%" layoutH="138">
				<thead>
					<tr>
						<th align="center">序号</th>
						<th align="center">快递员姓名</th>
						<th align="center">电话</th>
						<th align="center">快递网点</th>
						<th align="center">工作类型</th>
						<th align="center">工作时间</th>
						<th align="center">工作状态</th>
						<th align="center">工作区域名称</th>
						<th align="center">所在城市</th>
						<th align="center">发货点</th>
						<th align="center">工作区域</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator var="courier" value="page.data" status="st">
						<tr target="sid_support" rel="<s:property value="#courier.id" />">
							<th width="1%" align="center"><s:property value="page.pageSize * (page.currentPage-1) + #st.index + 1" />
							</th>
							<th width="3%" align="left"><s:property value="#courier.realname" />
							</th>
							<th width="3%" align="left"><s:property value="#courier.mobile" />
							</th>
							<th width="5%" align="left"><s:property value="#courier.netSiteName" />
							</th>
							
							<th width="5%" align="left">
							 <s:if test="#courier.workType==0">
                     					       普通取件员	
						           </s:if>
						           <s:elseif test="#courier.workType==1">
						            	 <span style="color:red">    同城直送员</span>
									</s:elseif>
							</th>
							
							<th width="5%" align="left"><s:date name='#courier.workStartTime' format="HH:mm" />-<s:date name='#courier.workEndTime' format="HH:mm" />
							<th width="2%" align="left">
								 <s:if test="#courier.workFlag==0">
                     					       收工	
						           </s:if>
						           <s:else>
						            	     开工
						           </s:else>
							</th>
							
							<th width="2%" align="left"><s:property value="#courier.areaMapName" />
							</th>
							<th width="2%" align="center"><s:property value="#courier.cityName" />
							</th>
							<th width="2%" align="left"><s:property value="#courier.originName" />
							</th>
							
							<th width="12%" align="left"><%-- <s:property value="#netsiteMap.netsiteMap" /> --%>
								   <s:if test="#courier.courierMap.length()>70">
                     					 <s:property value="#courier.courierMap.substring(0, 70)" />
						           </s:if>
						           <s:else>
						                     <s:property value="#courier.courierMap" />
						           </s:else>
								
							</th>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="panelBar">
				<div class="pages">
					<span>共${page.totalNum }条，共${page.totalPage }页</span>
				</div>
				<div class="pagination" targetType="navTab" totalCount="${page.totalNum }" numPerPage="${page.pageSize }" pageNumShown="10" currentPage="${page.currentPage }"></div>
			</div>
		</div>
	</form>
</c:if>
<c:if test="${code==0}">
	${message}
</c:if>